package com.qijian.maindata.domain.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.tool.domain.Storage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/***
 * 原材料检验-物料明细 新增保存检验方案请求
 */
@Data
public class PurchaseTakeQtItemVo {
    //原始检验方案id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    //收料通知检验单id
    private Long purmPurchaseTakeQtId;

    //检验方案明细id
    private Long detailId;

    //检验项明细
    private List<TableItems> tableItems;

    //检验项
    @Data
    public static class TableItems {
        //检验项明细id
        @JsonSerialize(using= ToStringSerializer.class)
        private Long id;

        //检验项明细名
        private String inspectionName;

        //检验项id
        @JsonSerialize(using= ToStringSerializer.class)
        private Long mainItemId;

        @ApiModelProperty(value = "检验编号")
        private String examineCode;

        @ApiModelProperty(value = "检验项")
        private String examineName;

        @ApiModelProperty(value = "检验标准")
        private String examineStandard;

        @ApiModelProperty(value = "检验单位")
        private String examineUnit;

        @ApiModelProperty(value = "是否必检")
        private Boolean isMust;

        @ApiModelProperty(value = "检验工具")
        private String examineTool;

        @ApiModelProperty(value = "是否自检,默认true")
        private Boolean isSelfCheck;

        @ApiModelProperty(value = "下限值")
        private String minValue;

        @ApiModelProperty(value = "上限值")
        private String maxValue;

        @ApiModelProperty(value = "默认值")
        private String defaultValue;

        @ApiModelProperty(value = "自检频次")
        private Long frequency;

        @ApiModelProperty(value = "专检频次")
        private Long specFrequency;

        private String specMethod;

        private String selfMethod;

        @ApiModelProperty(value = "检验项url")
        private String itemUrl;

        @ApiModelProperty(value = "检验项序号")
        private String itemIndex;

        //检验项说明
        private String remarks;

        private Boolean isText;

        private Boolean isSpecCheck;

        //排序号
        private Integer orderNum;

        //备注
        private String remark;

        //自检值
        private String selfValues;
        //专检值
        private String specValues;
        //专检复检测量值
        private String secondValues;
        //自检复检测量值
        private String selfSecondValues;
        //自检附件
        private List<Storage> selfFiles;
        //专检附件
        private List<Storage> specFiles;
    }
}
